package com.shrct.businessprocess.purchase.impl;

import com.shrct.businessprocess.purchase.RCBasePurchaseRequest;
import com.shrct.businessprocess.purchase.RCProductPurchaseRequestDAO;
import com.shrct.businessprocess.purchase.RCPurchaseRequestProcess;
import com.shrct.businessprocess.purchase.impl.RCPurchaseRequestProcessImpl;
import edu.fudan.mylang.pf.BaseService;
import edu.fudan.mylang.pf.IObjectFactory;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.purchase.RCProductPurchaseRequestDAO")
public class RCProductPurchaseRequestDAOImpl extends BaseService implements RCProductPurchaseRequestDAO {
  public RCPurchaseRequestProcess startPurchaseProcess(final RCBasePurchaseRequest purchaseRequest) {
    IObjectFactory _objectFactory = this.getObjectFactory();
    RCPurchaseRequestProcess _create = RCPurchaseRequestProcessImpl.create(_objectFactory);
    final Procedure1<RCPurchaseRequestProcess> _function = new Procedure1<RCPurchaseRequestProcess>() {
        public void apply(final RCPurchaseRequestProcess it) {
          it.start(purchaseRequest);
        }
      };
    RCPurchaseRequestProcess _doubleArrow = ObjectExtensions.<RCPurchaseRequestProcess>operator_doubleArrow(_create, _function);
    return _doubleArrow;
  }
}
